Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing compatibility with older versions. #81

Merged
merged 2 commits into from
Jun 25, 2024

Conversation

SrBlecaute01
Copy link
Contributor

This PR performs a backward compatibility fix.

In older versions, the method for obtaining the server version did not work, as it threw an index out of bounds when it was obtained. This PR implements a more consistent way of obtaining the server version from the code in this project here.

Another error was with classes not supported for older java, because they were compiled with more recent versions. Specifically the PatheticMapper class as shown in the image.

error

Centralize all maven compatibility properties (source and target) only in the parent project to prevent child projects from having compatibility with different versions of java.

NOTE: Only tested on version 1.8.9, tests for other versions may be necessary.

In old versions the index out of bounds exception was called. Parts of the code from this
project were used, which has a more consistent way of obtaining versions from Regex:
https://github.com/lucko/helper/blob/master/helper/src/main/java/me/lucko/helper/reflect/MinecraftVersions.java#L139
@GodCipher GodCipher added bug Something isn't working build-pr-jar Buils a PR Jar for this PR internal labels Jun 23, 2024
@GodCipher
Copy link
Member

Good catch, thanks for contributing! We will consider your PR in the next update of pathetic.

@GodCipher GodCipher merged commit e943dec into patheloper:trunk Jun 25, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build-pr-jar Buils a PR Jar for this PR internal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants